using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using VFC.Config;

namespace VFC.Emu
{
    class Log
    {
        public static void Append(string msg)
        {
            if (!File.Exists(App.LogPath))
            {
                FileStream fs = new FileStream(App.LogPath, FileMode.Create);
                fs.Close();
            }
            try
            {
                StreamWriter sw = File.AppendText(App.LogPath);
                sw.WriteLine(msg);
                sw.Flush();
                sw.Close();
            }
            catch(Exception e)
            {
                Console.WriteLine("ERROR: " + e.Message);
            }
        }
    }
}
